#!/bin/bash
CUR_SHELL_DIR=`pwd`
tar -vxzf jdk-8u271-linux-x64.tar.gz
tar -vxzf apache-maven-3.6.2-bin.tar.gz
cp -r ./apache-maven-3.6.2 /usr/local
cp -r ./jdk1.8.0_271 /usr/local
echo 'JAVA_HOME=/usr/local/jdk1.8.0_271
  JRE_HOME=$JAVA_HOME/jre
  PATH=$PATH:$JAVA_HOME/bin
  CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
  export JAVA_HOME
  export JRE_HOME
  export PATH
  export CLASSPATH

export MAVEN_HOME=/usr/local/apache-maven-3.6.2
export PATH=${MAVEN_HOME}/bin:$PATH
' >> /etc/profile
source /etc/profile
java -version
mvn -v

